Integrand size = 35, antiderivative size = 463 \[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=-\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f i-e j) (h i-g j) (i+j x)}+\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(h i-g j)^2}+\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \operatorname {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 f p^2 q^2 \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2}-\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2} \]
[Out]
Time = 0.78 (sec) , antiderivative size = 463, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2465, 2443, 2481, 2421, 6724, 2444, 2441, 2440, 2438, 2495} \[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\frac {2 b h p q \operatorname {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(h i-g j)^2}-\frac {2 b h p q \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(h i-g j)^2}+\frac {2 b f p q \log \left (\frac {f (i+j x)}{f i-e j}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{(f i-e j) (h i-g j)}-\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(i+j x) (f i-e j) (h i-g j)}+\frac {h \log \left (\frac {f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(h i-g j)^2}-\frac {h \log \left (\frac {f (i+j x)}{f i-e j}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(h i-g j)^2}+\frac {2 b^2 f p^2 q^2 \operatorname {PolyLog}\left (2,-\frac {j (e+f x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 h p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2} \]
[In]
[Out]
Rule 2421
Rule 2438
Rule 2440
Rule 2441
Rule 2443
Rule 2444
Rule 2465
Rule 2481
Rule 2495
Rule 6724
Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(g+h x) (i+j x)^2} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \text {Subst}\left (\int \left (\frac {h^2 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(h i-g j)^2 (g+h x)}-\frac {j \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(h i-g j) (i+j x)^2}-\frac {h j \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(h i-g j)^2 (i+j x)}\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \text {Subst}\left (\frac {h^2 \int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{g+h x} \, dx}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\text {Subst}\left (\frac {(h j) \int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{i+j x} \, dx}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\text {Subst}\left (\frac {j \int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right )^2}{(i+j x)^2} \, dx}{h i-g j},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = -\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f i-e j) (h i-g j) (i+j x)}+\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{(h i-g j)^2}-\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(h i-g j)^2}-\text {Subst}\left (\frac {(2 b f h p q) \int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )}{e+f x} \, dx}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(2 b f h p q) \int \frac {\left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right ) \log \left (\frac {f (i+j x)}{f i-e j}\right )}{e+f x} \, dx}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(2 b f j p q) \int \frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{i+j x} \, dx}{(f i-e j) (h i-g j)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = -\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f i-e j) (h i-g j) (i+j x)}+\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(h i-g j)^2}-\text {Subst}\left (\frac {(2 b h p q) \text {Subst}\left (\int \frac {\left (a+b \log \left (c d^q x^{p q}\right )\right ) \log \left (\frac {f \left (\frac {f g-e h}{f}+\frac {h x}{f}\right )}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {(2 b h p q) \text {Subst}\left (\int \frac {\left (a+b \log \left (c d^q x^{p q}\right )\right ) \log \left (\frac {f \left (\frac {f i-e j}{f}+\frac {j x}{f}\right )}{f i-e j}\right )}{x} \, dx,x,e+f x\right )}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\text {Subst}\left (\frac {\left (2 b^2 f^2 p^2 q^2\right ) \int \frac {\log \left (\frac {f (i+j x)}{f i-e j}\right )}{e+f x} \, dx}{(f i-e j) (h i-g j)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = -\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f i-e j) (h i-g j) (i+j x)}+\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(h i-g j)^2}+\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}-\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \text {Li}_2\left (-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2}-\text {Subst}\left (\frac {\left (2 b^2 h p^2 q^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {h x}{f g-e h}\right )}{x} \, dx,x,e+f x\right )}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )+\text {Subst}\left (\frac {\left (2 b^2 h p^2 q^2\right ) \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {j x}{f i-e j}\right )}{x} \, dx,x,e+f x\right )}{(h i-g j)^2},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )-\text {Subst}\left (\frac {\left (2 b^2 f p^2 q^2\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {j x}{f i-e j}\right )}{x} \, dx,x,e+f x\right )}{(f i-e j) (h i-g j)},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = -\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(f i-e j) (h i-g j) (i+j x)}+\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b f p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {h \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (i+j x)}{f i-e j}\right )}{(h i-g j)^2}+\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \text {Li}_2\left (-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 f p^2 q^2 \text {Li}_2\left (-\frac {j (e+f x)}{f i-e j}\right )}{(f i-e j) (h i-g j)}-\frac {2 b h p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \text {Li}_2\left (-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2}-\frac {2 b^2 h p^2 q^2 \text {Li}_3\left (-\frac {h (e+f x)}{f g-e h}\right )}{(h i-g j)^2}+\frac {2 b^2 h p^2 q^2 \text {Li}_3\left (-\frac {j (e+f x)}{f i-e j}\right )}{(h i-g j)^2} \\ \end{align*}
Time = 0.41 (sec) , antiderivative size = 654, normalized size of antiderivative = 1.41 \[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\frac {(f i-e j) (h i-g j) \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+h (f i-e j) (i+j x) \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log (g+h x)-h (f i-e j) (i+j x) \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log (i+j x)-2 b p q \left (a-b p q \log (e+f x)+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \left ((h i-g j) (j (e+f x) \log (e+f x)-f (i+j x) \log (i+j x))-h (f i-e j) (i+j x) \left (\log (e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+\operatorname {PolyLog}\left (2,\frac {h (e+f x)}{-f g+e h}\right )\right )+h (f i-e j) (i+j x) \left (\log (e+f x) \log \left (\frac {f (i+j x)}{f i-e j}\right )+\operatorname {PolyLog}\left (2,\frac {j (e+f x)}{-f i+e j}\right )\right )\right )-b^2 p^2 q^2 \left ((h i-g j) \left (\log (e+f x) \left (j (e+f x) \log (e+f x)-2 f (i+j x) \log \left (\frac {f (i+j x)}{f i-e j}\right )\right )-2 f (i+j x) \operatorname {PolyLog}\left (2,\frac {j (e+f x)}{-f i+e j}\right )\right )-h (f i-e j) (i+j x) \left (\log ^2(e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+2 \log (e+f x) \operatorname {PolyLog}\left (2,\frac {h (e+f x)}{-f g+e h}\right )-2 \operatorname {PolyLog}\left (3,\frac {h (e+f x)}{-f g+e h}\right )\right )+h (f i-e j) (i+j x) \left (\log ^2(e+f x) \log \left (\frac {f (i+j x)}{f i-e j}\right )+2 \log (e+f x) \operatorname {PolyLog}\left (2,\frac {j (e+f x)}{-f i+e j}\right )-2 \operatorname {PolyLog}\left (3,\frac {j (e+f x)}{-f i+e j}\right )\right )\right )}{(f i-e j) (h i-g j)^2 (i+j x)} \]
[In]
[Out]
\[\int \frac {{\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )}^{2}}{\left (h x +g \right ) \left (j x +i \right )^{2}}d x\]
[In]
[Out]
\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int { \frac {{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )} {\left (j x + i\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int \frac {\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2}}{\left (g + h x\right ) \left (i + j x\right )^{2}}\, dx \]
[In]
[Out]
\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int { \frac {{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )} {\left (j x + i\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int { \frac {{\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{{\left (h x + g\right )} {\left (j x + i\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{(g+h x) (i+j x)^2} \, dx=\int \frac {{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2}{\left (g+h\,x\right )\,{\left (i+j\,x\right )}^2} \,d x \]
[In]
[Out]